﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;

namespace qdata
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        { 
          string[]  ScityArr=  ConfigurationSettings.AppSettings["ScityArr"].ToString().Split('|');
          string[]  EcityArr=  ConfigurationSettings.AppSettings["EcityArr"].ToString().Split('|');
          string    site=  ConfigurationSettings.AppSettings["site"].ToString();
        
          huochenet h = new huochenet();
          h.SaveHuocheData(ScityArr, EcityArr, site);
          TotalData.GetInstance().DoTotal(ScityArr, EcityArr, site);
          KyzData.GetInstance().Save(ScityArr, EcityArr, site);
          KyzData.GetInstance().DoTotal(ScityArr, EcityArr, site);
          MessageBox.Show("成功！");
        }

        private void button2_Click(object sender, EventArgs e)
        {
          string[]  ScityArr=  ConfigurationSettings.AppSettings["ScityArr"].ToString().Split('|');
          string[]  EcityArr=  ConfigurationSettings.AppSettings["EcityArr"].ToString().Split('|');
          string    site=  ConfigurationSettings.AppSettings["site"].ToString();
          TotalData.GetInstance().Doinfo(ScityArr, EcityArr, site);
          KyzData.GetInstance().WriteXmlInfo(ScityArr, EcityArr, site);
        }
    }
}
